home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_1 / confist.zip / CONFLIST.WAS < prev    next >
Text File  |  1993-02-11  |  5KB  |  173 lines

  1. ;**ConfList Pro*********************************************
  2. ;This script was writen to display the conferences availible
  3. ;on the Execitive Network while your online. Please read the 
  4. ;Readme.txt file for setup information. 
  5. ;***********************************************************
  6. ;***Globals*************
  7. string send,select,choice,fond
  8. integer status,general=0,vendor=0,busin=0,datacom=0,progra=0
  9. integer enterta=0,gendiscu=0,private=0,special=0,basnet=0
  10. integer midilink=0,altinter=0,miscintr=0,intnews=0,intrec=0
  11. integer intrscin=0,intersoc=0,region=0,bbbnet=0,infonet=0,usemis=0
  12. integer options,favorite
  13. proc main
  14. integer dlgstatus=0
  15. ;*The main dialog displays the different conference sections.***
  16. dialogbox 32 15 263 222 2 "Conference Selection"
  17.    checkbox 6 33 73 9 "Gerenal Technical" general
  18.    checkbox 6 47 101 10 "Vendor/Product Supported" vendor
  19.    checkbox 6 60 103 11 "Business + Financial" busin
  20.    checkbox 6 76 84 10 "Data Communications" datacom
  21.    checkbox 6 90 94 10 "Programming Language" progra
  22.    checkbox 6 105 97 9 "Entertainment + Leisure" enterta
  23.    checkbox 6 119 92 11 "General Discussions" gendiscu
  24.    checkbox 6 135 83 10 "Private Conferences" private
  25.    checkbox 6 150 107 9 "Special (read-only,temp,ect.)" special
  26.    checkbox 6 164 116 10 "BasNet + SourseNet Technical" basnet
  27.    checkbox 6 178 106 10 "MidiLink Music Network" midilink
  28.    checkbox 133 31 103 10 "Altternate Topics (InterNet)" altinter
  29.    checkbox 133 47 121 10 "Miscellaneous Topics (InterNet)" miscintr
  30.    checkbox 133 62 61 9 "InterNet News" intnews
  31.    checkbox 133 76 115 10 "Recreational Topics (InterNet)" intrec
  32.    checkbox 133 90 120 10 "Science Related Topics (InterNet)" intrscin
  33.    checkbox 133 105 121 9 "Social Related Topics (InterNet)" intersoc
  34.    checkbox 133 119 47 10 "Regional" region
  35.    checkbox 133 134 93 9 "BioNet, BitNet + BizNet" bbbnet
  36.    checkbox 133 148 117 10 "Informational Topics (InterNet)" infonet
  37.    checkbox 133 162 97 10 "UseNet Miscellaneous" usemis
  38.    text  97 6 66 18 left "Select Conference, Then select OK"
  39.    pushbutton 58 199 40 14 "&OK" normal
  40.    pushbutton 161 199 40 14 "&CANCEL" cancel
  41.    checkbox 133 176 78 9 "Favorite Places" favorite
  42. enddialog
  43.  
  44.  
  45.   while dlgstatus !=10
  46.     dlgstatus=$DIALOG
  47.   endwhile
  48. ;the below section, defines the choice varible.
  49.   
  50.   if general
  51.     choice="d:\prowin\conf\general.txt"
  52.   endif
  53.   if vendor
  54.     choice="d:\prowin\conf\vendor.txt"
  55.   endif
  56.   if busin
  57.     choice="d:\prowin\conf\busin.txt"
  58.   endif
  59.   if datacom
  60.     choice="d:\prowin\conf\datacom.txt"
  61.   endif
  62.   if progra
  63.     choice="d:\prowin\conf\progra.txt"
  64.   endif
  65.   if enterta
  66.     choice="d:\prowin\conf\enterta.txt"
  67.   endif
  68.   if gendiscu
  69.     choice="d:\prowin\conf\gendiscu.txt"
  70.   endif
  71.   if private
  72.     choice="d:\prowin\conf\private.txt"
  73.   endif
  74.   if special
  75.     choice="d:\prowin\conf\special.txt"
  76.   endif
  77.   if basnet
  78.      choice="d:\prowin\conf\basnet.txt"
  79.   endif
  80.   if midilink
  81.      choice="d:\prowin\conf\midilink.txt"
  82.   endif
  83.   if altinter
  84.      choice="d:\prowin\conf\altinter.txt"
  85.   endif
  86.   if miscintr
  87.     choice="d:\prowin\conf\miscintr.txt"
  88.   endif
  89.   if intnews
  90.     choice="d:\prowin\conf\intnews.txt"
  91.   endif
  92.   if intrec
  93.     choice="d:\prowin\conf\intrec.txt"
  94.   endif
  95.   if intrscin
  96.     choice="d:\prowin\conf\intrscin.txt"
  97.   endif
  98.   if intersoc
  99.     choice="d:\prowin\conf\intersoc.txt"
  100.   endif
  101.   if region
  102.     choice="d:\prowin\conf\region.txt"
  103.   endif
  104.   if bbbnet
  105.      choice="d:\prowin\conf\bbbnet.txt"
  106.   endif
  107.   if infonet
  108.      choice="d:\prowin\conf\infonet.txt"
  109.   endif
  110.   if usemis
  111.      choice="d:\prowin\conf\usemis.txt"
  112.   endif
  113.   if favorite
  114.      choice="d:\prowin\conf\favorite.txt"
  115.   endif
  116.  destroydlg
  117.   call displa_list    
  118. endproc   
  119. ;This dialog box uses the choice varible, and displays
  120. ;the conference list.
  121. proc displa_list
  122. dialogbox 48 26 256 194 2 "Conference List"
  123.    flistbox 13 16 211 129 choice single select
  124.    pushbutton 12 161 63 22 "&Join Now" normal
  125.    pushbutton 80 160 83 23 "Add to &Favorite Places" update
  126.    pushbutton 169 160 52 23 "&CANCEL" cancel
  127. enddialog
  128.   
  129.   status=$DIALOG
  130.    while status!=1
  131.      if nullstr select
  132.         status = $DIALOG
  133.         loopwhile
  134.      endif
  135.     if status==10
  136.        sendconf ()
  137.        exitwhile
  138.     elseif status == 30
  139.         addconf ()
  140.     endif
  141.     status=$DIALOG
  142.    endwhile
  143.   exit
  144. endproc
  145.  
  146. proc sendconf
  147.  integer num
  148.  string selec
  149.    substr selec select 14 25    ;deletes the first 14 characters
  150.    atoi selec num       ;converts string to integer and gets only
  151.              ;the number from the string.
  152.    itoa num fond        ;convert integer back to a string.
  153.    strfmt send "j %s ^M" fond
  154.    transmit send
  155.   halt
  156. endproc
  157. ;****************************************************************
  158. ;this proc is used to add a conference to your Favorite Places.
  159. ;first it looks for the txt file, if it finds the file it writes
  160. ; the conference to the file. If its not found. It creates the
  161. ;file, and then writes the conference to the file. Then exits the
  162. ;script.
  163. ;****************************************************************
  164. proc addconf
  165.   if isfile "d:\prowin\conf\favorite.txt"
  166.     fopen 0 "d:\prowin\conf\favorite.txt" write text
  167.     fseek 0 0 2
  168.   else
  169.     fopen 0 "d:\prowin\conf\favorite.txt" create text
  170.   endif
  171.   fputs 0 select
  172.   fclose 0
  173. endproc